package com.foreknow.demo10;

public class Test {
    public static int add(int a,int b) throws NavigateNumberException{
        if(a < 0 || b < 0) {
            NavigateNumberException e = new NavigateNumberException();
            throw e;
        }
        return a + b;
    }
    public static void main(String[] args) {
        try {
            int x = Test.add(-3,5);
            System.out.println(x);
        } catch (NavigateNumberException e) {
            e.printStackTrace();
        }
        System.out.println("11111111111111111111");
    }
}
